<div id="main">
<div id="contents">
<form method="post" action="#" name="filters">
<fieldset>
    <legend>
        <label sid="extension.account"></label>
    </legend>
    <div class="frame_tab_layer">
        <table class="cmenutitle" width="100%" cellspacing="0" cellpadding="0" border="0">
            <tbody>
            <tr>
                <td class="frame_tab_left">
                    <label sid="extension.account_name"></label>
                </td>
                <td class="frame_tab_right">
                    <input type="text" onblur="read();" maxlength="30" size="11" name="id700">
                </td>
            </tr>
            <tr>
                <td class="frame_tab_left">
                    <label sid="extension.account_passwd"></label>
                </td>
                <td class="frame_tab_right">
                    <input id="id703" type="password" maxlength="30" size="11" name="id703">
                </td>
            </tr>
            <tr>
                <td class="frame_tab_left">
                    <label sid="extension.account_nickname"></label>
                </td>
                <td class="frame_tab_right">
                    <input id="id706" type="text" maxlength="30" size="11" name="id706">
                </td>
            </tr>
            <tr>
                <td class="frame_tab_left">
                    <label for="id653">
                        <label sid="extension.group"></label>
                    </label>
                </td>
                <td class="frame_tab_right">
                    <select id="id653" name="id653"></select>
                </td>
            </tr>
            <tr>
                <td class="frame_tab_left">
                    <label for="id708">
                        <label sid="extension.role"></label>
                    </label>
                </td>
                <td class="frame_tab_right">
                    <select name="id708">
                        <option value="U" sid="extension.user"></option>
                        <option value="O" sid="extension.attendant"></option>
                        <option value="P" sid="extension.manager"></option>
                    </select>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
</fieldset>
<fieldset>
<legend>
    <label sid="sip_trunk.table2_title"></label>
</legend>
<div class="frame_tab_layer">
    <table class="cmenutitle" width="100%" cellspacing="0" cellpadding="0" border="0">
        <tbody>
        <tr>
            <td class="frame_tab_left">
                <span id="img432" class="errormsg">&nbsp;</span>
                <label for="id432">
                    <label sid="extension.passwd"></label>
                </label>
            </td>
            <td class="frame_tab_right">
                <input id="id432" type="password" name="id432">
            </td>
        </tr>
        <tr>
            <td class="frame_tab_left">
                <span id="img592" class="errormsg">&nbsp;</span>
                <label for="id592">
                    <label sid="extension.call_with_pin"></label>
                </label>
            </td>
            <td class="frame_tab_right">
                <input id="id592" type="checkbox" name="id592">
            </td>
        </tr>
        <tr>
            <td class="frame_tab_left">
                <span id="img587" class="errormsg">&nbsp;</span>
                <label for="id587">
                    <label sid="extension.email"></label>
                </label>
            </td>
            <td class="frame_tab_right">
                <input id="id587" type="text" name="id587">
            </td>
        </tr>
        <tr>
            <td class="frame_tab_left">
                <span id="img471" class="errormsg">&nbsp;</span>
                <label for="id471">
                    <label sid="extension.mobile"></label>
                </label>
            </td>
            <td class="frame_tab_right">
                <input id="id471" type="text" name="id471">
            </td>
        </tr>
        <tr id="tr468">
            <td class="frame_tab_left">
                <span id="img468" class="errormsg">&nbsp;</span>
                <label for="id468">
                    <label sid="extension.color_ring_back"></label>
                </label>
            </td>
            <td class="frame_tab_right">
                <input id="id468" type="text" name="id468">
            </td>
        </tr>
        <tr id="tr470">
            <td class="frame_tab_left">
                <span id="img470" class="errormsg">&nbsp;</span>
                <label for="id470">
                    <label sid="extension.spd_dial_list"></label>
                </label>
            </td>
            <td class="frame_tab_right">
                <input id="id470" type="text" name="id470">
            </td>
        </tr>
        <tr id="tr472">
            <td class="frame_tab_left">
                <span id="img472" class="errormsg">&nbsp;</span>
                <label for="id472">
                    <label sid="extension.forking_number"></label>
                </label>
            </td>
            <td class="frame_tab_right">
                <input id="id472" type="text" name="id472">
            </td>
        </tr>
        <tr>
            <td class="frame_tab_left">
                <span id="img473" class="errormsg">&nbsp;</span>
                <label for="id473">
                    <label sid="extension.incoming_call_blocking"></label>
                </label>
            </td>
            <td class="frame_tab_right">
                <input id="id473" type="text" name="id473">
            </td>
        </tr>
        <tr>
            <td class="frame_tab_left">
                <span id="img675" class="errormsg">&nbsp;</span>
                <label for="id675">
                    <label sid="extension.secretary"></label>
                </label>
            </td>
            <td class="frame_tab_right">
                <input id="id675" type="text" onblur="read();" name="id675">
                <span style="padding-left:20px;">&nbsp;</span>
                <font id="name369">
                    <label for="id369">
                        <label sid="extension.enable"></label>
                    </label>
                </font>
                <span style="padding-left:5px;">&nbsp;</span>
                <input id="id369" type="checkbox" name="id369">
            </td>
        </tr>
        <tr id="ipphone2">
            <td class="frame_tab_left">
                <span id="img571" class="errormsg">&nbsp;</span>
                <label for="id571">
                    <label sid="extension.using_fixed_IP"></label>
                </label>
            </td>
            <td class="frame_tab_right">
                <input id="id571" type="text" maxlength="20" size="20" name="id571">
            </td>
        </tr>
        </tbody>
    </table>
    <br>
    <center>
        <table class="cmenutitle" width="90%" cellspacing="0" cellpadding="0" border="0">
            <tbody>
            <tr>
                <td width="5%">
                    <input id="id598" type="checkbox" name="id598">
                </td>
                <td width="20%">
                    <label for="id598">
                        <label sid="extension.pickup"></label>
                    </label>
                </td>
                <td width="5%">
                    <input id="id435" type="checkbox" name="id435">
                </td>
                <td width="20%">
                    <label for="id435">
                        <label sid="extension.call_waiting"></label>
                    </label>
                </td>
                <td>
                    <input id="id355" type="checkbox" name="id355">
                </td>
                <td>
                    <label for="id355">
                        <label sid="extension.distinctive_ring"></label>
                    </label>
                </td>
                <td>
                    <input id="id444" type="checkbox" name="id444">
                </td>
                <td>
                    <label for="id444">
                        <label sid="extension.DND"></label>
                    </label>
                </td>
            </tr>
            <tr>
                <td>
                    <input id="id434" type="checkbox" name="id434">
                </td>
                <td>
                    <label for="id434">
                        <label sid="extension.call_hold"></label>
                    </label>
                </td>
                <td>
                    <input id="id439" type="checkbox" name="id439">
                </td>
                <td>
                    <label for="id439">
                        <label sid="extension.call_transfer"></label>
                    </label>
                </td>
                <td>
                    <input id="id593" type="checkbox" name="id593">
                </td>
                <td>
                    <label for="id593">
                        <label sid="extension.outbound_transfer"></label>
                    </label>
                </td>
                <td>
                    <input id="id448" type="checkbox" name="id448">
                </td>
                <td>
                    <label for="id448">
                        <label sid="extension.reverse_battery"></label>
                    </label>
                </td>
            </tr>
            </tbody>
        </table>
    </center>
</div>
</fieldset>

<div class="submitFooter">

    <input sid="sbutton.save" class = "button" type ="button" name = "submit" id="submit"/>
    <input sid="ivr_menu.basic" class="button" type="button" name="ip_extension_stat" id="super_button"/>

</div>
</form>
</div>
</div>
<br>
<div id="helpContainer">
    <div id="help">
        <div>
            <h2>
                <label sid="share.help"></label>
            </h2>
        </div>
        <div id="helpBody">
            <dl>

                <dt class="term">
                    <label sid="desktopphones.sp3"></label>
                </dt>
                <dd class="definition">
                    <label sid="desktopphones.sp3Tip"></label>
                </dd>
                <dt class="term">
                    <label sid="desktopphones.sp3_5"></label>
                </dt>
                <dd class="definition">
                    <label sid="desktopphones.sp3_5_step1"></label><br>
                    <label sid="desktopphones.sp3_5_step1_2"></label><br><br>
                    <label sid="desktopphones.sp3_5_step2"></label><br>
                    <label sid="desktopphones.sp3_5_step2_2"></label><br><br>
                    <label sid="desktopphones.sp3_5_step3"></label><br>
                    <label sid="desktopphones.sp3_5_step3_2"></label>
                </dd>

                <dt class="term">
                    <label sid="desktopphones.spp4"></label>
                </dt>
                <dd class="definition">
                    <label sid="desktopphones.spp4Tip"></label>
                </dd>
                <dt class="term">
                    <label sid="desktopphones.sp4_1"></label>
                </dt>
                <dd class="definition">
                    <label sid="desktopphones.sp4_1Tip"></label>
                </dd>

                <dt class="term">
                    <label sid="desktopphones.sp4_5"></label>
                </dt>
                <dd class="definition">
                    <label sid="desktopphones.sp4_5Tip"></label><br>
                    <label sid="desktopphones.sp4_5Tip2"></label>
                </dd>
                <dt class="term">
                    <label sid="desktopphones.sp4_6"></label>
                </dt>
                <dd class="definition">
                    <label sid="desktopphones.sp4_6_step1"></label><br>
                    <label sid="desktopphones.sp4_6_step1_2"></label><br><br>
                    <label sid="desktopphones.sp4_6_step2"></label><br>
                    <label sid="desktopphones.sp4_6_step2_2"></label>
                </dd>

                <dt class="term">
                    <label sid="desktopphones.sp4_8"></label>
                </dt>
                <dd class="definition">
                    <label sid="desktopphones.sp4_8Tip"></label>
                </dd>


                <dt class="term">
                    <label sid="desktopphones.sp4_11"></label>
                </dt>
                <dd class="definition">
                    <label sid="desktopphones.sp4_11Tip"></label>
                </dd>
                <dt class="term">
                    <label sid="desktopphones.sp4_12"></label>
                </dt>
                <dd class="definition">
                    <label sid="desktopphones.sp4_12Tip"></label>
                </dd>
                <dt class="term">
                    <label sid="desktopphones.sp4_19"></label>
                </dt>
                <dd class="definition">
                    <label sid="desktopphones.sp4_19Tip"></label>
                </dd>
                <dt class="term">
                    <label sid="desktopphones.sp4_13"></label>
                </dt>
                <dd class="definition">
                    <label sid="desktopphones.sp4_13Tip"></label>
                </dd> <dt class="term">
                <label sid="desktopphones.sp4_14"></label>
            </dt>
                <dd class="definition">
                    <label sid="desktopphones.sp4_14Tip"></label>
                </dd>
                <dt class="term">
                    <label sid="desktopphones.sp4_15"></label>
                </dt>
                <dd class="definition">
                    <label sid="desktopphones.sp4_15Tip"></label>
                </dd>

            </dl>

        </div>
    </div>
</div>

<script type="text/javascript" src="js/getSelectList.js"></script>
<script type="text/javascript">



	if(lineshow("4000")){
	var sendtext = "";
	for(var i=1;i<7;i++) {
			sendtext +='&line_id='+i+"&id=758";
	}
	
	xmlDataRequest("get_data",sendtext,function(data){
		var groupList = '';
		$(data).find("item").each(function(){
		if($(this).attr("id")=="758"&&$(this).attr("value") !==""){
  			groupList +='<option value="'+$(this).attr("line_id")+'">'+$(this).attr("value")+'</option>';
  		}
  	});
  		$("#id653").html(groupList);
  	var line_id =getCookie("line_id");
	getLinePage(line_id);
	setCookie("line_id",line_id);
  });
	}
	$("#submit").click(function () {
		var line_id=getCookie("line_id");
		if(line_id!==""&&line_id){
		$(".errormsg").html('');
		var nonames = new Array("submit","extension_batch","extension_stat","add_extension","ip_extension_batch","ip_extension_stat","id366","id584","delete_extension");
		var settext = "&line_id="+getCookie("line_id");
		settext+=getSetText(nonames);
		settext=settext.replace(/\#/g,"%23");
		submitform(modules["set_data"],settext);
	}else{
		//show_message("err",msg.selectline);
		alert(msg.selectline);
		}
	});

    $("#super_button").bind("click",function(){
        loadNewHtml("ip_extension_main_load.htm");
    });
	function read() {
	if($("[name=id700]").val()=='') {
		$("[name=id703]").attr("readonly",true);
		$("[name=id703]").css("background","#eeeeee");
		$("[name=id706]").attr("readonly",true);
		$("[name=id706]").css("background","#eeeeee");
		$("[name=id708]").attr('disabled',true);
	}else {
		$("[name=id703]").attr("readonly",false);
		$("[name=id703]").css("background","#ffffff");
		$("[name=id706]").attr("readonly",false);
		$("[name=id706]").css("background","#ffffff");
		$("[name=id708]").attr('disabled',false);
	}if($("[name=id675]").val()!=="") {
		$("[name=id369]").show();
		$("#name369").show();
	}else if($("[name=id675]").val()=="") {
		$("[name=id369]").hide();
		$("#name369").hide();
	}if($("#phone1").attr("display")==""&&$("#tr469").attr("display")=="") {
		if($("[name=id445]").val()=='0') {
			$('#tr469').hide();
		}else {
			$('#tr469').show();
		}
	}$("#436").checked=true;
	$("#429").checked=true;
	$("#446").checked=true;
	$("#438").checked=true;
}
</script>


